package drp.snowbell.module;

import java.util.Collection;

import drp.snowbell.cfg.EntityConfig;
import drp.snowbell.cfg.ModuleConfig;
import drp.snowbell.cfg.PartConfig;
import drp.snowbell.entity.IEntity;


public interface IModule {

	/**
	 * 初始化
	 * 
	 * @param mc
	 * @param entityConfigList
	 * @param partConfigList
	 */
	void initialize(ModuleConfig mc, Collection<EntityConfig> entityConfigList, Collection<PartConfig> partConfigList);

	/**
	 * 获取模块名称
	 * 
	 * @return
	 */
	String getName();

	/**
	 * 处理行为
	 * 
	 * @param context
	 * @return
	 */
	ActionResult doAction(ActionContext context);

	/**
	 * 获取实体实例
	 * 
	 * @param entityName
	 * @return
	 */
	IEntity newEntityInstance(String entityName);

	/**
	 * 获取部件实例
	 * 
	 * @param PartName
	 * @return
	 */
	IEntity newPartInstance(String PartName);
}
